System and method for separating ambient gravitational acceleration from a moving three-axis accelerometer data

ABSTRACT

A method based on separating ambient gravitational acceleration from a moving three-axis accelerometer data for determining a driving pattern is presented. A server may receive telematics data originating from a client computing device and combine the telematics data. The server may estimate a gravitational constant to the combined telematics data and generate a function for pitch and a roll angle from the combined telematics data. The server may further determine a driving pattern using at least the pitch and the roll angle.

RELATED APPLICATIONS

This application is related to U.S. patent application Ser. No.14/277,848, entitled “System And Method For Identifying Primary AndSecondary Movement Using Spectral Domain Analysis” and concurrentlyfiled, the entire disclosure of which is hereby expressly incorporatedby reference herein. This application is also related to U.S. patentapplication Ser. No. 14/277,867, entitled “System And Method ForIdentifying Idling Times Of A Vehicle Using Accelerometer Data” andconcurrently filed, the entire disclosure of which is hereby expresslyincorporated by reference herein. This application is also related toU.S. patent application Ser. No. 14/277,882, entitled “System And MethodFor Identifying Heading Of A Moving Vehicle Using Accelerometer Data”and concurrently filed, the entire disclosure of which is herebyexpressly incorporated by reference herein. This application is alsorelated to U.S. patent application Ser. No. 14/277,939, entitled “SystemAnd Method For Determining Driving Patterns Using Telematics Data” andconcurrently filed, the entire disclosure of which is hereby expresslyincorporated by reference herein.

TECHNICAL FIELD

The present disclosure generally relates to a system and method forseparating ambient gravitational acceleration from a moving three-axisaccelerometer data.

BACKGROUND

The background description provided herein is for the purpose ofgenerally presenting the context of the disclosure. Work of thepresently named inventors, to the extent it is described in thisbackground section, as well as aspects of the description that may nototherwise qualify as prior art at the time of filing, are neitherexpressly nor impliedly admitted as prior art against the presentdisclosure.

Many companies employ vehicle monitoring systems system for a variety ofpurposes, including determining insurance risks and/or premiums. Thesesystems may monitor many vehicle attributes, such as location, speed,acceleration/deceleration, etc. The monitoring devices are integratedwith the vehicle or plugged into the vehicle systems. Many of thesemonitoring systems require expert installation into the vehicle andfurther require the user to periodically withdraw the monitoring deviceto download the trip data

SUMMARY

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter.

Traditionally pitch and roll angles could only be measured when the onlyacceleration acting on the vehicle is gravity. However, the methodsdescribed below are advantageous over the prior art s they do notrequire the vehicle to be static to determine the orientation angles.Thus a reliable estimate of pitch and roll angles can be obtained evenfor a small amount of signal. For example if the device is continuouslyaccelerated for few minutes, traditional methods will fail to provide areliable estimate of relative orientation because the vehicle was neverstatic. Also, the traditional methods require preprocessing to identifywhen the vehicle was static which is not always feasible. In someembodiments, the methods described below assume there is no relativemotion between the vehicle and the accelerometer sensor and we refer tothat as primary movement data

In one embodiment a computer implemented method for a primary movementwindow from a vehicle trip may comprise receiving, via a computernetwork, a plurality of telematics data originating from a clientcomputing device and combining, at the one or more processors, thetelematics data. The method may also include estimating, at the one ormore processors, a gravitational constant from the combined telematicsdata and generating, at the one or more processors, a pitch and a rollangle from the combined telematics data. The method may further includedetermining a driving pattern using at least the pitch and the rollangle.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a simplified and exemplary block diagram of a system andmethod for separating ambient gravitational acceleration from a movingthree-axis accelerometer data;

FIG. 2 is an exemplary architecture of a data system;

FIG. 3 illustrates a client computing device placed in a vehicle;

FIG. 4 is a flowchart illustrating an exemplary method for determiningdriving pattern data according to an embodiment;

FIG. 5A is a flowchart illustrating an exemplary method for extractinginformation contained in a non-random time series signal for use indetermining one or more driving patterns;

FIG. 5B is a flowchart illustrating an exemplary method for determiningif a plurality of data points meet a data threshold;

FIG. 5C is a flowchart illustrating another exemplary method fordetermining if a plurality of data points meet a data threshold;

FIG. 5D is a flowchart illustrating another exemplary method foradjusting the extracted information contained in a non-random timeseries signal;

FIG. 6A is a flowchart illustrating an exemplary method for identifyingidling times of a vehicle using accelerometer data;

FIG. 6B a graph of the normalized standard deviation for every second ofa vehicle trip;

FIG. 6C is a graph depicting a three axis accelerometer signal andvehicle idling indicator as a function of time;

FIG. 7A is a flowchart illustrating an exemplary method for transformingraw accelerometer data into a form for use in determining a pitch androll angle, and determining a driving pattern;

FIG. 7B depicts pitch, roll and yaw angles with respect to a three axisaccelerometer in a smartphone;

FIG. 7C depicts a 3D scatter plot showing the various accelerationevents of a driving car measured by the three axis accelerometer in aclient computing device;

FIG. 7D depicts a scatter plot of acceleration events withoutgravitational acceleration;

FIG. 7E is a flowchart illustrating an exemplary method for transformingraw accelerometer data into a form for use in determining a pitch androll angle for use in determining a driving pattern;

FIG. 8 is a flowchart illustrating an exemplary method for derivingdriving patterns from telematics data according to an embodiment;

FIG. 9 is a flowchart illustrating an exemplary method for transformingraw accelerometer data into a form for use in determining a yaw angleand determining a premium and a driving pattern;

FIG. 10A is a graph depicting an example scatter plot of x and y datafor a client computing device placed in a vehicle;

FIG. 10B is a graph depicting an example scatter plot of x and y datafor a client computing device placed in a vehicle;

FIG. 10C is yet another graph depicting an example scatter plot of x andy data for a client computing device placed in a vehicle;

FIG. 10D is another graph depicting an example scatter plot of x and ydata for a client computing device placed in a vehicle;

FIG. 10E is yet another graph depicting an example scatter plot of x andy data for a client computing device placed in a vehicle; and

FIG. 10F is yet another graph depicting an example scatter plot of x andy data for a client computing device placed in a vehicle.

The figures depict a preferred embodiment of the present invention forpurposes of illustration only. One skilled in the art will readilyrecognize from the following discussion that alternative embodiments ofthe structures and methods illustrated herein may be employed withoutdeparting from the principles of the invention described herein.

DETAILED DESCRIPTION

Although the following text sets forth a detailed description ofdifferent embodiments, it should be understood that the legal scope ofthe description is defined by the words of the claims set forth at theend of this patent. The detailed description is to be construed asexemplary only and does not describe every possible embodiment sincedescribing every possible embodiment would be impractical, if notimpossible. Numerous alternative embodiments could be implemented, usingeither current technology or technology developed after the filing dateof this patent, which would still fall within the scope of the claims.

It should also be understood that, unless a term is expressly defined inthis patent using the sentence “As used herein, the term” “is herebydefined to mean . . . ” or a similar sentence, there is no intent tolimit the meaning of that term, either expressly or by implication,beyond its plain or ordinary meaning, and such term should not beinterpreted to be limited in scope based on any statement made in anysection of this patent (other than the language of the claims). To theextent that any term recited in the claims at the end of this patent isreferred to in this patent in a manner consistent with a single meaning,that is done for sake of clarity only so as to not confuse the reader,and it is not intended that such claim term be limited, by implicationor otherwise, to that single meaning. Finally, unless a claim element isdefined by reciting the word “means” and a function without the recitalof any structure, it is not intended that the scope of any claim elementbe interpreted based on the application of 35 U.S.C. §112, sixthparagraph.

FIG. 1 illustrates various aspects of an exemplary architectureimplementing a system for separating ambient gravitational accelerationfrom a moving three-axis accelerometer data. The high-level architectureincludes both hardware and software applications, as well as variousdata communications channels for communicating data between the varioushardware and software components. The system for separating ambientgravitational acceleration from a moving three-axis accelerometer datamay include various software and hardware components or modules.

The separating ambient gravitational acceleration from a movingthree-axis accelerometer data may include front end components,including a client computing device 104. The client computing device 104may be placed in a vehicle, such as a car 102. The client computingdevice 104 may include a personal computer, a smart phone, a tabletcomputer, a smart watch, a head mounted display, a wearable computer orother suitable client computing device. A processor of the clientcomputing device 104 may execute instructions to collect data from oneor more onboard sensors. For example, the sensors may include a compass106, a barometer 108, a proximity sensor 110, an accelerometer 112, agyroscope 114 and a magnometer 116. In some embodiments, the clientcomputing device 104 may have some or all of these sensors. In someembodiments, the client computing device 104 may include additionalsensors. The client computing device 104 may also include a cellularnetwork transceiver 118 and/or a local network transceiver 120 forcommunicating with the backend components 122 via the computer network124.

In some embodiments, a processor of the client computing device 104executes instructions to manage, receive and transmit data collected bythe sensors, and/or other data, such as an account identifier associatedwith a customer account or a client computing device identifier. Theclient computing device 104 may transmit data to, or otherwisecommunicate with, back end components 122 via the computer network 124.The computer network 124 may be a network such as the Internet or othertype of suitable network (e.g., local area network (LAN), a metropolitanarea network (MAN), a wide area network (WAN), a mobile, a wired orwireless network, a private network, a virtual private network, etc.).The computer network 124 may also be one or more cellular networks suchas code division multiple access (CDMA) network, GSM (Global System forMobile Communications) network, WiMAX (Worldwide Interoperability forMicrowave Access) network, Long Term Evolution (LTE) network, etc. Theprocessor of the client computing device 104 may also execute one ormore applications to perform the tasks discussed above. The clientcomputing device 104 may also execute one or more applications to allowa customer to manage a customer account, view driving statistics, changesettings, etc.

The back end components 122 may include a data server 128 and an accountdatabase 131. The back end components may communicate with each otherthrough a communication network 138 such as a local area network orother type of suitable network (e.g., the Internet, a metropolitan areanetwork (MAN), a wide area network (WAN), a mobile, a wired or wirelessnetwork, a private network, a virtual private network, etc.).

In some embodiments, the system for separating ambient gravitationalacceleration from a moving three-axis accelerometer data in general, andthe data server 128 in particular, may include computer-executableinstructions 130. A processor of the data server 128 may execute theinstructions 130 to instantiate an access tool 132, a retrieval tool 134and an analysis tool 136. The access tool 132 may receive data from theclient computing device 104 and save the data to one or more databases,such as the vehicle database 130. The retrieval tool 134 may retrievedata from the account database 131 or use an account identifier toaccess customer account information from the account database 131. Theaccount database 131 may be a data storage device such as random-accessmemory (RAM), hard disk drive (HDD), flash memory, flash memory such asa solid state drive (SSD), etc. The analysis tool 136 may perform one ormore analyses on the vehicle data and/or customer account data.

Referring now to FIG. 2, a data system 200 includes a controller 202.Exemplary data systems include the client computing device 104 and thedata server 128 as illustrated in FIG. 1. The controller 202 includes aprogram memory 204, a microcontroller or a microprocessor (W) 206, arandom-access memory (RAM) 208, and an input/output (I/O) circuit 210,all of which are interconnected via an address/data bus 212. The programmemory 204 may store computer-executable instructions, which may beexecuted by the microprocessor 206. In some embodiments, the controller202 may also include, or otherwise be communicatively connected to, adatabase 214 or other data storage mechanism (e.g., one or more harddisk drives, optical storage drives, solid state storage devices, etc.).It should be appreciated that although FIG. 2 depicts only onemicroprocessor 206, the controller 202 may include multiplemicroprocessors 206. Similarly, the memory 204 of the controller 202 mayinclude multiple RAMs 216 and multiple program memories 218, 218A and218B storing one or more corresponding server application modules,according to the controller's particular configuration.

Although FIG. 2 depicts the I/O circuit 210 as a single block, the I/Ocircuit 210 may include a number of different types of I/O circuits (notdepicted), including but not limited to, additional load balancingequipment, firewalls, etc. The RAM(s) 216, 208 and the program memories218, 218A and 218B may be implemented in a known form of computerstorage media, including but not limited to, semiconductor memories,magnetically readable memories, and/or optically readable memories, forexample, but does not include transitory media such as carrier waves.

FIG. 3 illustrates a client computing device, such as the clientcomputing device 104, placed in a vehicle, such as the car 102 depictedin FIG. 1. Although the vehicle in FIGS. 1 and 3 is a car, thetechniques described in this application can be used with othervehicles, such as trucks, planes, boats, motorcycles, etc. The clientcomputing device illustrated in FIG. 3 is placed perpendicular to thecar, such that the x-, y- and z-axis of the client computing device arenot properly aligned with the x-, y- and z-axis of the vehicle. In someembodiments, the client computing device 104 may be placed in anotherposition in the vehicle. Furthermore, in some embodiments, the placementof the client computing device may shift during a trip made by thevehicle, a person may pick up the client computing device, etc. Theclient computing device 104 may use a sensor, such as the accelerometer112, to collect and/or record four basic types of driving relatedg-forces that help uniquely identify a driving pattern. These areg-forces associated with accelerometer, accelerating, braking, left andright turns.

The client computing device 104 and/or the data server 128 may executean instruction to convert raw accelerometer data into a useable formatbefore the data can be analyzed to determine driving patterns. Forexample, the raw accelerometer data may include the movement of thevehicle (primary movement) as well as the movement of the clientcomputing device in relation to the vehicle (secondary movement). Insome embodiments, the client computing device may move around or bounceon a seat, dashboard, etc. while the vehicle is in motion. Before anymeaningful driving patterns can be extracted from the data, thesecondary movement must be removed from the primary movement.Furthermore, the orientation of the client computing device incomparison to the vehicle may change during the course of the trip.

Accordingly, if a processor of a data server, such as the data server128 illustrated in FIG. 1 executed an instruction or set of instructionsto analyze telematics data recorded by the client computing device 104,the analysis may be incorrect, because the client computing device isnot oriented properly with the vehicle. The methods and systemsdescribed in this application demonstrate some embodiments of techniqueswhich may be used to orient telematics data recorded by the clientcomputing device, such that a processor analyzing the telematics datamay orient the client computing device 104 with the vehicle 102.

FIG. 4 is a flowchart of a method, routine, algorithm or process 400 forusing driving data to determine a driving pattern. The method 400 may beperformed by the processor of a client computing device 104, a dataserver 128, etc. The processor may execute an instruction stored inmemory to receive a plurality of telematics data corresponding to a tripof a vehicle (block 402). The plurality of telematics data may bereceived via a computer network, such as the internet. The plurality oftelematics data may originate from a client computing device 104 thatcollects telematics data using one or more of the sensors. For example,the accelerometer 112 of the client computing device may be used tocapture and/or record data at a specified sample rate, for example, 1Hz, 40 Hz, 50 Hz, etc. In some embodiments, a sample rate of more than 1sample per second may be used. In some embodiments, the processor mayexecute an instruction to collect accelerometer data every second, 30seconds, minute, etc. In some embodiments, the processor of the clientcomputing device may collect data for a certain period of time beforetransmitting the data and/or performing analysis, such as, for example,every day, every week, every month, etc.

The processor of the client computing device may execute an instructionto identify primary movement windows and/or constant speed windows ofthe vehicle trip from the plurality of telematics data (block 404). Morespecifically, the processor may execute an instruction to separate theplurality of telematics data into primary and secondary movement data,and remove the secondary movement data from the dataset. For example, aspart of executing this instruction, the processor may receive an x-axisaccelerometer value, a y-axis accelerometer value and a z-axisaccelerometer value. In some embodiments, the processor may receive afunction of the accelerometer data, such as the mean of x-axisaccelerometer values over a certain time interval (such as one second),etc. The processor may also execute an instruction to flag a valueindicating when device movement is detected. For example, the processormay set a binary indicator equal to one. Techniques fordetermining/identifying one or more primary movement windows arediscussed in further detail.

At one or more points during execution of the method 400, the processormay also execute an instruction to determine whether GPS data isavailable. The processor may execute a further instruction to determineif the available GPS data is accurate. More specifically, the processormay analyze an indication of the GPS speed and the GPS accuracy, andexecute an instruction to determine if the GPS data is available andaccurate. The processor may further execute an instruction to output avalue indicating that the GPS data is available and accurate. Forexample, the processor may execute an instruction to determine if theGPS accuracy level meets a desired threshold level and flag a certainvalue (such as a binary value) if the GPS accuracy level meets a desiredthreshold level and flag a second value (such as a binary value set to0) if the GPS accuracy level does not meet a desired threshold level.Accordingly, in some embodiments the accelerometer data may be augmentedby the GPS data.

The processor may further execute an instruction to separate thetelematics data into one or more trip segments. For example, theprocessor may determine that device movement is detected and may executean instruction to create a new trip segment in memory as well as anidentifier for the trip segment. In some embodiments, the processor mayexecute an instruction to make a trip based on data originating from aGPS and/or data originating from an accelerometer. Techniques fordetermining primary and secondary movement data are discussed in furtherdetail below.

The processor may also execute an instruction to identify one or moreidling windows of the vehicle trip (block 406). In some embodiments, theprocessor may also execute an instruction to identify an idling time ofa vehicle using the accelerometer data. The processor may execute aninstruction to determine the standard deviation of the x-axisaccelerometer values over a one second interval. Similarly, theprocessor may also execute an instruction to determine the standarddeviation of the y-axis and/or z-axis accelerometer values over a onesecond interval as well. The processor may execute an instruction todetermine when the vehicle has stopped, and to flag a value indicatingwhen device movement is detected. For example, the processor may set abinary indicator equal to one. Techniques for determining idling timesare discussed in further detail below.

At one or more points during the method 400, the processor may alsoexecute an instruction to remove any noise or outliers. A variety ofmethods to remove noise and outliers from data are known in the art andwill not be further described for the sake of brevity. The processor mayexecute an instruction to analyze the primary movement data and generatea pitch angle and a roll angle (block 408).

For example, the processor may execute an instruction to determine oneor more initial values for pitch and roll. For example, the processormay receive as inputs telematics data in an x-axis accelerometer value,a y-axis accelerometer value and a z-axis accelerometer value. In someembodiments, the processor may receive a function of the accelerometerdata, such as the mean of x-axis accelerometer values over a certaintime interval (such as one second), etc. The processor may then executean instruction to determine final pitch and roll angles. Morespecifically, the processor may execute an instruction to rotate the x-,y- and z-axis data by the estimated pitch and roll angles. For example,the processor may determine the optimal combination of pitch and rollangles that produces the maximum amount of data points in the XY planewithin a predefined radius of the origin. In this manner, the processormay determine the final pitch and roll angles that best align gravitywith the Z-axis. In some embodiments, the instruction may include anoffset with the estimated pitch and roll angles.

The processor may further execute an instruction to rotate thetelematics data by the final pitch and roll angles to produce rotatedx-axis data and rotated y-axis data. In this manner, gravity is rotatedout of the two dimensions and data depicts the phone as “flat” withrespect to the vehicle. Techniques for generating a pitch and a rollangle are discussed in further detail below.

The processor may also execute an instruction to analyze the primarymovement data and generate one or more yaw angle estimates (block 410)and determine a final yaw angle (block 412) from the one or more yawangle estimates. For example, the processor may execute an instructionto determine one or more yaw angles. The processor may analyze therotated x-axis data and the rotated y-axis data and further execute aninstruction to rotate the inputs through a 90° range and select anoptimal yaw angle. In some embodiments, the processor may furtherexecute an instruction to determine an azimuth value. For example, theazimuth value may be the angle of the client computing device's y-axiseast of magnetic north and be an angle between 0° and 360°. Theprocessor may then execute an instruction to determine one or morecandidate angles. For example, the candidate angles may be the optimalangle plus an offset angle. The offsets may be a value of 0°, 90°, 180°and 270°. The processor may further execute an instruction to compute acorrelation between the lateral G forces and azimuth change for each ofthe four candidate angles and identify the angle that maximizes thecorrelation. The processor may further execute an instruction toidentify the angle that maximized the correlation as the final yawangle. Techniques for generating a pitch and a roll angle are discussedin further detail below.

The processor may execute an instruction to determine one or moredriving patterns (block 414) and use at least this information todetermine an insurance risk. In some embodiments, the processor mayexecute an instruction to determine an auto insurance risk using atleast one or more constant speed time windows. In some embodiments, theprocessor may execute an instruction to use the driving patterns todetermine one or more driving characteristics of a driver associatedwith an insurance account. For example, the processor may execute one ormore instructions to determine that at least the pitch, roll and yawangles are indicative of at least one of an acceleration event, abraking event, a left turn event and a right turn event. The processormay also execute an instruction to determine a risk level of the driverassociated with the insurance account based on the drivingcharacteristics and/or driving patterns. The processor may also executean instruction to determine one or more insurance premiums based on therisk level.

FIG. 5A is a flowchart of a method, routine, algorithm or process 500for extracting information contained in a non-random time series signalfor use in determining one or more driving patterns. The method 500 maybe used to perform time domain or spectral domain analysis on telematicsdata collected from one or more sensors, such as an accelerometer of asmart phone, tablet, smart watch, etc. The method 500 may be performedby the processor of a client computing device 104 and/or a data server128.

Generally speaking, accelerometers may record data in three axes,lateral (X-axis), longitudinal (Y-axis) and force of gravity (Z-axis).However, because the raw accelerometer data is recorded from a clientcomputing device, the orientation of the device in relation to thevehicle is unknown. Accordingly, before the raw accelerometer data hasany meaning (i.e., what data is from what axis), the device must beoriented in relation to the car. The method 500 may be used to identifyprimary movement versus secondary movement, accelerated data versusnon-accelerated data, etc.

As discussed above, the accelerometer of the client computing device mayrecord data at a certain sample rate. The processor of the data server,such as the data server 128, may receive the raw accelerometer data(block 502) at the specified sample rate, for example, 1 Hz, 40 Hz, 50Hz, etc. The processor may execute an instruction to summarize the dataat a desired sample level and split the data into temporal segments orwindows (block 504). For example the data could be summarized at 1 Hzand each segment can be 64 seconds. Of course, this is for example only,and any sample level and segment length may be used. As a furtherexample, the data can be summarized for the trip, at a day level, monthlevel, year level, etc. The processor may also execute an instruction todetermine the three data points in the data segment (block 506) anddetermine if the three data points meet a data threshold (block 508). Insome embodiments, the processor may execute an instruction to find anamplitude and a cross-periodogram for each segment for all possiblefrequencies and/or over all frequencies. The processor may also executean instruction to store these values for every segment.

Turning now to FIG. 5B, an example method 510 for determining if thethree data points meet the data threshold is presented. The method 510may be used, for example, to determine if a data segment containsprimary movement data or secondary movement data. Two types of movementmeasured by an accelerometer inside a driving vehicle are primarymovement data and secondary movement data. Primary movement data is datarecorded when the accelerometer is static with respect to the vehicleand measures the vehicle's acceleration/braking and left/right turns.Secondary movement data is recorded when the accelerometer is movingwith respect to the vehicle. Because of this, secondary movement data isconsidered invalid for identifying vehicles acceleration/braking andleft/right turns. Identifying primary versus secondary movement data iscrucial in orienting the accelerometer device with the vehicle.Furthermore, the three orientation angles, pitch, roll and yaw whichuniquely identify the orientation of an accelerometer device within amoving vehicle, are meaningful only for primary movement data.

In one embodiment, if at least one data point in the data segment isabove a threshold value, then the data segment contains secondarymovement data. The processor may execute an instruction to select afirst data point from the data segment (block 512) and determine if theselected data point meets the threshold value (block 514). If theprocessor executing the instruction determines that the selected datapoint does meet the threshold value (YES branch of block 514), theprocessor may determine that the accelerometer is moving with respect tothe vehicle and tag the data segment as secondary movement data. If theprocessor executing the instruction determines that the selected datapoint does not meet the threshold value (NO branch of block 514), theprocessor may determine if any data points remain in the segment (block518) and may select the next data point (block 520), such as the seconddata point in the data segment. The processor may then repeat blocks514-520 to compare each data point to the threshold until every datapoint is compared. If the processor determines that no data points meetthe threshold value (NO branch of block 518), the processor executes aninstruction to tag the data segment as primary movement data (block524).

For example, the processor may execute an instruction to use thefrequency decomposition of accelerometer signal. The time series datafrom the x-axis of any three axis accelerometer can be expanded as a sumof sine and cosine functions using the Fourier expansion defined as:

$X_{t} = {\frac{A_{0}^{x}}{2} + {\sum\limits_{k = 1}^{m}{A_{k}^{x}{\cos\left( {\omega_{k}t} \right)}}} + {B_{k}^{x}{\sin\left( {\omega_{k}t} \right)}}}$

In the above expression, t is the time subscript, t=1, 2, . . . , n, nis the number of observations in the time series and X_(t) are the nx-axis accelerometer data. The number of frequencies in the Fourierdecomposition is m (m=n/2 if n is even; m=(n−1)/2 if n is odd), A_(k)^(x), B_(k) ^(x) are the cosine and sine coefficients and ω_(k) are theFourier frequencies: ω_(k)=2π/n. Functions of the Fourier coefficientsA_(k) ^(x) and B_(k) ^(x) can be plotted against frequency or wavelength and are referred as periodograms. The amplitude periodogram isdefined as:

$J_{k}^{x} = {\frac{n}{2}\left( {\left( A_{k}^{x} \right)^{2} + \left( B_{k}^{x} \right)^{2}} \right)}$

A kernel smoothed estimate of this amplitude periodogram is given as:S _(k) ^(xx)=Σ_(j=−p) ^(p) W _(p) J _(k+j) ^(x)

Letting i represent the imaginary unit √−1, the cross-periodogrambetween x and y-axis is defined as:

$J_{k}^{xy} = {\frac{n}{2}\left\lbrack {\left( {{A_{k}^{x}A_{k}^{y}} + {B_{k}^{x}B_{k}^{y}}} \right) + {i\left( {{A_{k}^{x}B_{k}^{y}} - {A_{k}^{y}B_{k}^{x}}} \right)}} \right\rbrack}$

A kernel smoothed estimate of the amplitude cross-periodogram is definedas:S _(k) ^(xy)=|Σ_(j=−p) ^(p) W _(p) J _(k+j) ^(xy)|

The processor may execute an instruction to use an estimate, such as thesmoothed estimates similar to the ones given by the equations above,from all the three x-, y- and z-axis accelerometer data to determine ifthe three data points meet the data threshold.

When the total time series data has n observations, (i.e. where n>p)then the processor may execute an instruction to split a sample into oneor more segments where each segment has p observations. The processormay also execute an instruction to combine a segment with less than pobservations with the previous segment. In some embodiments, theprocessor may execute an instruction to restrict p to be even. For anygiven segment the processor may execute an instruction to define thetotal spectral power matrix as:T _(l) ^(ij)=Σ_(k) S _(k) ^(ij)

In the above expression i and j represent the three axes, {x, y, z}, andl denotes a segment with p or more data points. The total spectral poweris a measure of what is happening at various time series segments overtime. When the cross spectral power is high beyond a certain threshold,that indicates a movement of the device different from normal vehicledriving. Normal vehicle driving will show up in at least one of thethree axes of an accelerometer depending on the orientation of theaccelerometer with respect to the driving vehicle. But when the devicemoves with respect to a vehicle, it will show up as rapid large changesin acceleration along multiple axes. The frequency and time scale atwhich such an event would occur would be different from a typicaldriving related acceleration event.

Turning now to FIG. 5C, an example method 530 for determining if thethree data points meet the data threshold is presented. The method 530may be used, for example, to determine if a data segment containsacceleration data or non-acceleration data. Because there are variousaspects that feed into determining a vehicle's driving pattern, drivingenvironment (city versus highway), driving time (day versus night),driving style (speed, braking, etc.) may all influence the drivingpattern. Some of these characteristics can be indirectly measured bymeasuring how often, during primary movement, a vehicle accelerates.Identifying total accelerated versus non-accelerated driving time isuseful in determining driving environment and driving behavior, andthus, such a measure can help identify improved insurance premium.

In one embodiment, if all three data points in the data segment fallbelow a threshold value, then the data segment is mostly noise andshould be tagged as non-acceleration data, or constant speed data. Whenthe vehicle is not accelerated and when no secondary movement ispresent, the accelerometer will mostly measure noise and vehiclevibrations. The three diagonal elements of the total spectral power willbe very low for a segment which is mostly noise. The processor mayexecute an instruction to use the diagonal elements and logic with asuitable threshold to identify when the vehicle is moving with constantor zero speed during primary movement.

The processor may execute an instruction to select a first data pointfrom the data segment (block 532) and determine if the selected datapoint meets the threshold value (block 534). If the processor executingthe instruction determines that the selected data point does meet thethreshold value (YES branch of block 534), the processor may determinethat the data segment is acceleration data (block 636).

If the processor executing the instruction determines that the selecteddata point does not meet the threshold value (NO branch of block 534),the processor may select the second data point and determine whether thesecond data point meets the threshold value (block 538). If theprocessor executing the instruction determines that the second datapoint does meet the threshold value (YES branch of block 538), theprocessor may determine that the data segment is acceleration data(block 536). If the processor executing the instruction determines thatthe second data point does not meet the threshold value (NO branch ofblock 538), the processor may select the third data point and determinewhether the second data point meets the threshold value (block 540). Ifthe processor determines that the third data point does not meet thethreshold value (NO branch of block 540), the processor executes aninstruction to tag the data segment as non-acceleration data (block542).

Turning now to FIG. 5D, an example method 540 is presented for adjustingthe extracted information contained in a non-random time series signalfor use in determining one or more driving patterns. In someembodiments, the processor may execute an instruction to redefine one ormore segments to avoid segment boundary effects (block 544). Forexample, the processor may execute an instruction to redefine thesegments by shifting down every segment by one data point or more. Theprocessor may also execute an instruction to execute an instruction tore-analyze one or more data segments based on the redefinition (block546). For example, the processor may execute an instruction to repeatone or more steps from the method 500, 510, 530, etc. The processor mayalso execute an instruction to merge the data (block 548). For example,the processor may execute an instruction to merge all segments back tothe original time-stamped data. Since a data point could have appearedin various trailing segments, multiple secondary movement and constantspeed indicators exist for any given data point.

FIG. 6A is a flowchart of a method, routine, algorithm or process 600for identifying idling times of a vehicle using accelerometer data. Themethod 600 may be used to perform time domain or spectral domainanalysis on telematics data collected from one or more sensors, such asan accelerometer of a smart phone, tablet, smart watch, etc. The method600 may be performed by the processor of a client computing device 104and/or a data server 128.

Time-stamped acceleration data, collected by an accelerometer sensor ofa client device, can be used to identify various driving patterns of thevehicle. For example, the time-stamped acceleration data can be used toidentify the idling times of a vehicle (i.e., when the vehicle is notmoving). Because idling time can indicate the geography of a trip,idling time is a good measure of environment conditions under which avehicle is being driven. For example, city driving trips tend to havefrequent short interval idle times due to stop signs. Traditionally,most geographic ratings for auto insurance is based on the locationwhere the vehicle is garaged. However, insurance policies can be moreaccurately priced for geography if the actual route is taken intoconsideration. Accordingly, the method 600 is used to determine drivingpatterns that may be considered when determining an auto insurancerating.

As discussed above, the accelerometer of the client computing device mayrecord data at a certain sample rate. The processor of the data server,such as the data server 128, may execute an instruction to receiveacceleration data from the client computing device (block 602). Forexample, in some embodiments the data server may measure the three axisaccelerometer data from a device residing in the vehicle at the highestpossible resolution for the entire trip of the vehicle. Next, theprocessor of the data server may execute an instruction to identify oneor more primary movement windows of the trip (block 604). For example,the data server may execute an instruction to identify times when thedevice is not moving with respect to the vehicle (primary movement) andwhen it is moving with respect to the vehicle (secondary movement), asdescribed in further detail in method 500 described above in referenceto FIG. 5A. The data server may further execute an instruction to onlyanalyze the primary movement data in subsequent steps of the method 600(block 606).

Next, the processor of the data server may execute an instruction tomeasure the total variance from all three axis data at various timestamps (block 608). In some embodiments, the processor of the dataserver may execute an instruction to measure the total standarddeviation in addition to, or instead of, the total variance. Asdescribed above, accelerometers may record data in three axes, the totalvariance is the sum of variance from the three axes and total standarddeviation is the square root of total variance. The processor of thedata server may also execute an instruction to determine the averagesignal total variance for the entire trip from all three axes (block610) and normalize the total variance at various time stamps for thethree axes using the overall average (block 612). Of course, theprocessor may also execute an instruction to find the average standarddeviation and normalized standard deviation as well. As described above,idling time is a good measure of environment conditions under which avehicle is being driven. Accordingly, the frequency of idling and totalidling time are good proxies to classify the type of route a drivertakes and hence a better measure for rating a policy based on drivingenvironment. Next, the processor may also execute an instruction to testif the normalized variance is below a threshold level (block 614), andidentify one or more idling time windows (block 616). For example, ifthe variance or standard deviation at a given time stamp is 40% belowthe overall average, then the processor may tag that data record as thevehicle idling.

In some embodiments, the processor may also execute an instruction tocompare the idling time windows with additional vehicle idling timedata. For example, the idling time could be obtained from GPS,accelerometer or from the vehicle's onboard diagnostic port.

The processor may execute an instruction to use the identified idlingtime windows to determine one or more driving patterns of the vehicle(block 618). For example, if there are few idling time windows, theprocessor may determine a driving pattern corresponding to highwaypattern. In some embodiments, the processor may also execute aninstruction to use at least the determined driving patterns to determinean auto insurance rating.

FIGS. 6A and 6C show a processor of the data server applying the method600 to a sample driving data set. A total of about 33 minutes of drivingand idling data was collected. In this example, the accelerometer datawas measured using the accelerometer sensor in a smart phone. When thephone was not moving with respect to the vehicle, the accelerometer wasmeasuring the vehicle's acceleration. When the phone was moving withrespect to the vehicle (secondary movement data) such movements wereidentified and removed from analysis.

FIG. 6B depicts a graph of the normalized standard deviation for everysecond of the trip. The dashed line shows the cutoff below which thedata is identified as idling time.

FIG. 6C depicts a three axis accelerometer signal and vehicle idlingindicator as a function of time. The plot shows ten temporal regions 650where the vehicle was stopped or idling.

FIG. 7A is a flowchart of a method, routine, algorithm or process 700for transforming raw accelerometer data into a form for use indetermining a pitch and a roll angle, and determining a driving pattern.The method 700 may be performed by the processor of the client computingdevice 104 and/or the data server 128. The data server (such as the dataserver 128) described in reference to FIG. 1) may receive the rawtelematics data from the client computing device (block 702). In someembodiments, the processor of the client computing device may receivethe raw telematics data from a sensor of the client computing device,such as the accelerometer 112, etc. In some embodiments where a tripsegment includes few or no acceleration events, the method mayincorporate an assumption that the only substantive force acting on thephone is gravity. Thus, it should be true that the average value of theevents along the x- and y-axis (representing forward/backwards motionand left/right motion, respectively) in reference to the vehicle shouldbe zero. Accordingly, the method 700 may be useful in certainembodiments, such as when a particular trip segment contains few or noacceleration events.

Next, the processor of the data server may execute an instruction toidentify primary movement data (block 704). For example, the data servermay execute an instruction to identify times when the device is notmoving with respect to the vehicle (primary movement) and when it ismoving with respect to the vehicle (secondary movement), as described infurther detail in the method 500 described above in reference to FIG.5A. The data server may further execute an instruction to only use theprimary movement data in subsequent steps of the method 700.

The processor may execute an instruction to create one or more datasegments where the orientation of the device is static with respect tothe vehicle (block 706). In some embodiments, if the created datasegments are too long, the processor may also execute an instruction tocreate sub-segments (block 708). The processor may also execute aninstruction to remove noise and/or other outlier data (block 710). Theprocessor may also execute an instruction to combine the data points.For example, if the trip segment is a 14 minute trip segment and 60 datapoints have been recorded per each minute of the trip segment, there maybe 840 total data points.

For each segment, the processor may execute an instruction tostandardize the accelerometer data (block 712). For example, theprocessor may execute an instruction to standardize the data at arequired Hz value.

As described above, the processor uses the method 700 to analyzeaccelerometer data from a vehicle to find the orientation of the vehiclewith respect to Earth's gravity. The orientation angles are referred toas the device's pitch and roll angles, which relates it to a fixed axis.Furthermore, the orientation angles are used by the processor of thedata server to separate out the acceleration due to ambient gravityversus the vehicle's acceleration. In the following example, the vehicleacceleration is denoted as X_(i)′, Y_(i)′ and Z_(i)′ where X_(i)′ andare the lateral and longitudinal directions respectively with theassumption that the vehicle's z-axis, Z_(i)′, is always aligned toEarth's gravity. The subscript i is used to denote the differenttimestamps. The accelerometer axes are denoted by X_(i), Y_(i) and Z_(i)and the rotation along each axis of the accelerometer can be expressedin the matrix form as below:

${R_{x}(\phi)} = \begin{pmatrix}1 & 0 & 0 \\0 & {\cos\;\phi} & {\sin\;\phi} \\0 & {{- \sin}\;\phi} & {\cos\;\phi}\end{pmatrix}$ ${R_{y}(\theta)} = \begin{pmatrix}{\cos\;\theta} & 0 & {{- \sin}\;\theta} \\0 & 1 & 0 \\{\sin\;\theta} & 0 & {\cos\;\theta}\end{pmatrix}$ $\begin{matrix}{{R_{z\;}(\psi)} =} & \begin{pmatrix}{\cos\;\psi} & {\sin\;\psi} & 0 \\{{- \sin}\;\psi} & {\cos\;\psi} & 0 \\0 & 0 & 1\end{pmatrix}\end{matrix}$

The rotation about the x-axis is referred as pitch or elevation (φ), therotation about the y-axis is roll or bank (θ) and rotation about thez-axis is the yaw or heading (ψ). FIG. 7B shows these angles withrespect to a three axis accelerometer in a smartphone. Using theseangles the mathematical relation between a vehicle's orientation and thedevice's orientation is given below:

$\begin{pmatrix}X_{i}^{\prime} \\Y_{i}^{\prime} \\Z_{i}^{\prime}\end{pmatrix} = {{R_{z}(\psi)}{R_{x}(\phi)}{R_{y}(\theta)}\begin{pmatrix}X_{i} \\Y_{i} \\Z_{i}\end{pmatrix}}$ $\begin{pmatrix}X_{i}^{\prime} \\Y_{i}^{\prime} \\Z_{i}^{\prime}\end{pmatrix} = {{R_{z}(\psi)}\begin{pmatrix}{\cos\;\theta} & 0 & {{- \sin}\;\theta} \\{\sin\;\theta\;\sin\;\phi} & {\cos\;\phi} & {\cos\;\theta\;\sin\;\phi} \\{\sin\;{\theta cos}\;\phi} & {{- \sin}\;\phi} & {\cos\;{\theta cos}\;\phi}\end{pmatrix}\begin{pmatrix}X_{i} \\Y_{i} \\Z_{i}\end{pmatrix}}$

The above relationships can be incorporated into an instruction executedby the processor to express a rotation matrix.

As described above, the method estimates pitch and roll by maximizingthe sum of the squares of the force in the Z′-axis at each time stamp inorder to produce rotation angles that will align the accelerometer'sZ-axis with the direction of the force of gravity. For example, theprocessor may execute an instruction to maximize the function S, where:S(a,b,c)=Σ_(i)(a X _(i) +bY _(i) +cZ _(i))²

The parameters a, b, and c represent the elements in a row of therotation matrix, and as such are subject to the following constraint:a ² +b ² +C ²=1

The method of Lagrange multipliers was used to maximize S subject to theconstraint above. Expressing the data in terms of a matrix X where:

$X = \begin{pmatrix}X_{1} & Y_{1} & Z_{1} \\\vdots & \vdots & \vdots \\X_{n} & Y_{n} & Z_{n}\end{pmatrix}$

The processor may also execute an instruction to summarize the data(block 714). For example, the processor may execute an instruction tosummarize the data in the form of a matrix. In the above example, thesolution is an eigenvector corresponding to the largest eigenvalue ofthe following matrix:

$\left( {X^{T}X} \right) = \begin{pmatrix}{\sum\limits_{i}X_{i}^{2}} & {\sum\limits_{i}{X_{i}Y_{i}}} & {\sum\limits_{i}{X_{i}Z_{i}}} \\{\sum\limits_{i}{X_{i}Y_{i}}} & {\sum\limits_{i}Y_{i}^{2}} & {\sum\limits_{i}{Y_{i}Z_{i}}} \\{\sum\limits_{i}{X_{i}Z_{i}}} & {\sum\limits_{i}{Y_{i}Z_{i}}} & {\sum\limits_{i}Z_{i}^{2}}\end{pmatrix}$

The processor may also execute an instruction to maximize theacceleration along gravity on the combined data point total (block 716).For example, the processor may execute an instruction to diagonalize theabove matrix using any standard programming language and find theeigenvalues and eigenvectors. In another example, the processor mayexecute an instruction to measure an acceleration in the direction ofgravity from the telematics data and maximize the measured accelerationin the direction of gravity.

The processor may execute an instruction to determine an expression forpitch and roll (block 718). In some embodiments, the instruction mayincorporate an instruction that if the car is properly aligned with theclient computing, (t) is equal to 1G. For example, in the above matrix,the instruction executed by the processor may incorporate theeigenvector corresponding to the maximum eigenvalue and estimate pitchand roll. The processor may also execute an instruction to calculatethis eigenvector

$\begin{pmatrix}a \\b \\c\end{pmatrix}.$For example, in the previous example, the processor executing theinstruction obtains the following formulas for pitch (φ) and roll (θ),and the processor may execute an instruction to solve the aboveexpression in terms of pitch and roll such that:

$\phi = {{atan}\; 2\left( {{- b},{{{sign}(c)}\sqrt{a^{2} + c^{2}}}} \right)}$$\theta = {{atan}\left( \frac{a}{c} \right)}$

The processor may further execute an instruction to determine pitch androll by solving the expressions using the telematics data recorded bythe client computing device (block 720). The processor may also executean instruction to analyze the pitch and roll angles derived from theabove expressions to determine one or more driving patterns (block 722).The processor may also execute an instruction to use at least thedriving patterns to determine one or more auto insurance ratings,driving insurance premiums, etc. In some embodiments, the insurancepremiums may be associated with a user account, such as the user accountassociated with the client computing device. For example, the processormay execute an instruction to use the driving patterns to determine oneor more driving characteristics of a driver associated with an insuranceaccount. The processor may also execute an instruction to determine arisk level of the driver associated with the insurance account based onthe driving characteristics and/or driving patterns. The processor mayalso execute an instruction to determine one or more insurance premiumsbased on the risk level.

FIGS. 7C and 7D show the results of the method applied on test data froma smart phone which was lying static in a moving car. The phone'saccelerometer sensor is measuring both acceleration due to gravity andthe vehicle's acceleration. FIG. 7C depicts a 3D scatter plot showingthe various acceleration events of a driving car measured by the threeaxis accelerometer in a client computing device. FIG. 7D depicts ascatter plot of acceleration events without gravitational acceleration.For this data the measured pitch and roll angles were −0.23 degrees and−55.25 degrees respectively. FIG. 7D also shows the acceleration of thevehicle in a plane perpendicular to gravity which is obtained afterestimating pitch and roll.

FIG. 7E is a flowchart of a method, routine, algorithm or process 750for transforming raw accelerometer data into a form for use indetermining a pitch and a roll angle for use in determining a drivingpattern. The method 700 may be performed by the processor of the clientcomputing device 104 and/or a data server 128. The data server (such asdata server 128 described in reference to FIG. 1) may receive the rawtelematics data from the client computing device (block 752). In someembodiments, the processor of the client computing device may receivethe raw telematics data from a sensor of the client computing device,such as the accelerometer 112, etc. A processor of the server mayexecute an instruction to analyze the data and split the data into oneor more primary movement windows (block 754), as described above.

A processor of a server, such as the insurance server described inreference to FIG. 1, may execute an instruction to determine a linearexpression for gravity (block 756). In some embodiments, the instructionmay express pitch and roll using the expression:Z _(i)′=sin θ cos φX _(i)−sin φY _(i)+cos θ cos φZ _(i).

In some embodiments, the processor executing the instruction may alsoapply a matrix notation, such that:

${X\;\overset{\rightarrow}{\beta}} = \overset{\rightarrow}{C_{z}}$where: ${\overset{\rightarrow}{\beta} = \begin{pmatrix}{\sin\;{\theta cos}\;\phi} \\{{- \sin}\;\phi} \\{\cos\;\theta\;\cos\;\phi}\end{pmatrix}},{Z^{\prime} = \begin{pmatrix}Z_{1}^{\prime} \\\vdots \\Z_{n}^{\prime}\end{pmatrix}}$

The instruction executed by the processor may incorporate an assumptionthat gravity is the only force acting on the vehicle's z-axis (accordingto the reference frame of the car) and the instruction may alsoincorporate an assumption that the force of gravity is constant.Accordingly, the processor may execute an instruction to estimate agravitational constant from the telematics data. Though thegravitational assumption incorporated into the instruction may not holdtrue in some embodiments, due to bumps, vibrations, etc. during the tripof the vehicle, such deviations are typically minor and may be includedin the margin of error of the method.

In some embodiments, the processor may also execute an instruction tofactor out the constant. For example, if the constant is represented byC_(z), the processor may execute an instruction to factor out theconstant and derive the expression:

${X\;\overset{\rightarrow}{\beta}} = {C_{z}\begin{pmatrix}1 \\\vdots \\1\end{pmatrix}}$

The processor may also execute an instruction to establish a function ofthe gravitational constant (block 758). For example, the processor mayexecute an instruction to minimize the squared error in measuredgravity. In some embodiments the processor may execute an instructionincorporating an ordinary least squares solution, though in someembodiments other techniques may be used. For example, given the aboveexpression for {circumflex over (β)}, the processor may execute anordinary least squares solution such that:

$\overset{\rightarrow}{\beta} = {\left( {X^{T}X} \right)^{- 1}{X^{T}\begin{pmatrix}1 \\\vdots \\1\end{pmatrix}}\overset{\_}{g}}$

In the above expression, the term

$\left( {X^{T}X} \right)^{- 1}{X^{T}\begin{pmatrix}1 \\\vdots \\1\end{pmatrix}}$may be dependent only on the data matrix X and g=C_(z). The processormay execute an instruction to reduce the above expression to a 3-by-1vector. For example, the processor executing the instruction may set thevector to

$\quad\begin{pmatrix}a \\b \\c\end{pmatrix}$creating the following expression:

$\overset{\rightarrow}{\beta} = {\overset{\_}{g}\begin{pmatrix}a \\b \\c\end{pmatrix}}$

The processor may also execute an instruction to establish the pitch androll (block 760). For example, the processor may execute an instructionto establish pitch and roll via a least squares solution. For example,the processor may execute an instruction to incorporate one or morerotation matrix definitions, such as ∥{right arrow over (β)}∥=1 in orderto execute an expression for estimating g:

$\overset{\_}{g} = {\frac{1}{\sqrt{a^{2} + b^{2} + c^{2}}}.}$

The processor may execute an instruction to derive expressions for pitch(θ) and roll (φ) in terms of a, b, and c:

$\theta = {{atan}\left( \frac{a}{c} \right)}$$\phi = {{atan}\; 2\left( {{- b},{{{sgn}(c)}\sqrt{a^{2} + c^{2}}}} \right)}$

The processor may further execute an instruction to solve theexpression, determining the pitch and roll angles using the telematicsdata recorded by the client computing device (block 762). In someembodiments, the processor may also execute an instruction to comparethe pitch and roll values determined by the method 750 with the pitchand roll values determined by the method 700, and determine if thedifference is acceptable. The processor may further execute aninstruction to select one set of pitch and roll values or determine thefinal values of pitch and roll using an additional function. In someembodiments, the processor executing the instruction may determine thatthe difference is unacceptable and execute an instruction to compare theresults with traditional methods of estimating pitch and roll to choosea final value of pitch and roll.

The processor may also execute an instruction to analyze the pitch androll angles derived from the above expressions to determine one or moredriving patterns (block 764). The processor may also execute aninstruction to use at least the driving patterns to determine one ormore insurance premiums. For example, the processor may execute aninstruction to use the driving patterns to determine one or more drivingcharacteristics of a driver associated with an insurance account. Theprocessor may also execute an instruction to determine a risk level ofthe driver associated with the insurance account based on the drivingcharacteristics and/or driving patterns. The processor may also executean instruction to determine one or more insurance premiums based on therisk level.

Turning now to the method 800 illustrated in FIG. 8, a method fordetermining a yaw angle and determining a driving pattern fromtelematics data collected from a client computing device is described.In some embodiments, a processor of the client computing device mayreceive the raw telematics data from a sensor of the client computingdevice, such as the accelerometer 112, etc. A data server (such as dataserver 128 described in reference to FIG. 1) may receive the rawtelematics data from the client computing device (block 802). Aprocessor of the server may execute an instruction to analyze the dataand split the data into one or more primary movement windows (block804). A data server, such as the data server 128 described in referenceto FIG. 1 may receive telematics data from a client computing device.The processor may further execute an instruction to derive pitch androll angles from the telematics data, using, for example, the method 700described in reference to FIG. 7A.

In the following, the vehicle acceleration is denoted as X_(i)′, Y_(i)′and Z_(i)′, where X_(i)′ and Y_(i)′ are the lateral and longitudinaldirections respectively and it is assumed that the vehicle's z-axis,Z_(i)′, is always aligned to Earth's gravity. The subscript i is used todenote the different timestamps. The accelerometer axes are denoted byX_(i), Y_(i) and Z_(i) and the rotation along each axis of theaccelerometer can be expressed in the matrix form as below:

${R_{x}(\phi)} = \begin{pmatrix}1 & 0 & 0 \\0 & {\cos\;\phi} & {\sin\;\phi} \\0 & {{- \sin}\;\phi} & {\cos\;\phi}\end{pmatrix}$ ${R_{y}(\theta)} = \begin{pmatrix}{\cos\;\theta} & 0 & {{- \sin}\;\theta} \\0 & 1 & 0 \\{\sin\;\theta} & 0 & {\cos\;\theta}\end{pmatrix}$ ${R_{z}(\psi)} = \begin{pmatrix}{\cos\;\psi} & {\sin\;\psi} & 0 \\{{- \sin}\;\psi} & {\cos\;\psi} & 0 \\0 & 0 & 1\end{pmatrix}$

As discussed above, the rotation about the x-axis is referred as pitchor elevation (φ), the rotation about the y-axis is roll or bank (θ) androtation about the z-axis is the yaw or heading. Using these angles themathematical relation between a vehicle's orientation and the device'sorientation is given below:

$\begin{pmatrix}X_{i}^{\prime} \\Y_{i}^{\prime} \\Z_{i}^{\prime}\end{pmatrix} = {{R_{z}(\psi)}{R_{x}(\phi)}{R_{y}(\theta)}\begin{pmatrix}X_{i} \\Y_{i} \\{Z_{i}\;}\end{pmatrix}}$

If the direction of gravity is known with respect to the device's axisthen the above equation can be rewritten as:

$\begin{pmatrix}X_{i}^{\prime} \\Y_{i}^{\prime} \\Z_{i}^{\prime}\end{pmatrix} = {{R_{z}(\psi)}\begin{pmatrix}{\overset{\_}{X}}_{\iota} \\{\overset{\_}{Y}}_{\iota} \\{{\overset{\_}{Z}}_{i}\;}\end{pmatrix}}$ where: $\begin{pmatrix}{\overset{\_}{X}}_{\iota} \\{\overset{\_}{Y}}_{\iota} \\Z_{i}^{\prime}\end{pmatrix} = {\begin{pmatrix}{\cos\;\theta} & 0 & {{- \sin}\;\theta} \\{\sin\;\theta\;\sin\;\phi} & {\cos\;\phi} & {\cos\;{\theta sin}\;\phi} \\{\sin\;{\theta cos}\;\phi} & {{- \sin}\;\phi} & {\cos\;{\theta cos}\;\phi}\end{pmatrix}\begin{pmatrix}X_{i} \\Y_{i} \\Z_{i}\end{pmatrix}}$

In the above equation, X _(l), and Y _(l) are acceleration events in theXY-plane of the vehicle. There are four possible types of accelerationthat a vehicle commonly experiences: forward acceleration, backwardacceleration or braking, right turns and left turns. If theseacceleration events are plotted in the XY-plane of the vehicle, theywill look like distributed points with four possible modes. Theprocessor executing the method 800 may incorporate an assumption that atleast one of these modes is clearly distinguishable from the rest.

The processor may execute an instruction to remove vehicle's Z-axis data(block 806). In some embodiments the processor may execute aninstruction to remove Z-axis data based on the pitch and roll angles.Turning briefly to FIG. 10A, a graph is depicted with an example scatterplot of x and y data for a client computing device placed in a vehicle(such as the client computing device 104 and vehicle 102 depicted inreference to FIG. 1). As previously discussed, a processor may not beable to meaningfully use this data to determine one or more drivingpatterns because the alignment of the client computing device is unknownin relation to the vehicle. In other words the direction (i.e.forward/backward, left/right) is unknown. In some embodiments, theinstruction or set of instructions executed by the processor mayincorporate an assumption that the most common direction points alongthe y-axis. In other words, the instruction may incorporate anassumption that the most common thing a driver does is to acceleratedirectly forward or backwards, as opposed to turning left or right.

The processor may execute an instruction to exclude data points that donot constitute true events and/or that may be noise (block 808). Forexample, the processor may execute an instruction to remove any datathat does not meet a certain data threshold. For example, the processorexecuting the instruction may remove vectors with magnitudes less than acutoff c. In some embodiments, this may be expressed as X _(i) ²+Y _(i)²>c². For example, the cutoff value c may be set as 0.1G, though othercutoff values or expressions may be used. Turning briefly to FIG. 10B, agraph depicts a scatter plot of x and y data after the processor hasexecuted an instruction to remove data points with a value less than0.1G from the scatter plot depicted in FIG. 10A.

In some embodiments, the instruction may incorporate an assumption thatwhen the client computing device is properly oriented the correlationbetween the squares of the x and y data streams may be minimized. Forexample, this “correlation” may be represented as the sum of theproducts between x² and y². In some embodiments, the correlation may beexpressed in the following equations, where the x and y variablesrepresent the telematics data recorded by the client computing deviceafter the force of gravity has been factored out:

${\overset{\_}{X}}_{i}^{*} = \frac{{\overset{\_}{X_{i}}\cos\;\psi} + {\overset{\_}{Y_{i}}\sin\;\psi}}{\sqrt{{\overset{\_}{X}}_{i}^{2} + {\overset{\_}{Y}}_{i}^{2}}}$${\overset{\_}{Y}}_{i}^{*} = \frac{{\overset{\_}{X_{i}}\sin\;\psi} - {\overset{\_}{Y_{i}}\cos\;\psi}}{\sqrt{{\overset{\_}{X}}_{i}^{2} + {\overset{\_}{Y}}_{i}^{2}}}$

The processor may execute an instruction to evaluate all possible angles(block 810) given by μ_(i)=a tan 2(Y _(i),X _(i)). Furthermore, in someembodiments, the processor may also execute an instruction to transformthe variables of the objective function (block 812). The processor mayalso execute an instruction to determine a solution that solves theobjective function (block 814). In some embodiments, the processor maydetermine a solution that minimizes the objective function. For example,given the objective function Σ_(i) X _(i)*² Y _(i)*², the processor maycompute one or more equalities for ψ that minimize the objectivefunction. The processor may execute an instruction to apply the equalityto the objective function in order to determine an optimal angle (block816). For example, applying the equality to the objective function, mayresult in the optimal angle ψ₀ is given by:

${\tan\; 4\;\psi_{0}} = \frac{\sum\limits_{i}{\sin\; 4\mu_{i}}}{\sum\limits_{i}{\cos\; 4\mu_{i}}}$

In some embodiments, the optimal angle ψ₀ may be rewritten as:

$\psi_{0} = {\frac{1}{4}{atan}\; 2{\left( {{\sum\limits_{i}{\sin\; 4\mu_{i}}},{\sum\limits_{i}{\cos\; 4\mu_{i}}}} \right).}}$

As previously discussed, there are two components of data (x and y)representing forward/backwards motion and left/right motion,respectively. Accordingly, there are four effects represented by thedata. Furthermore, each of the effects is approximately 90 degrees fromeach other. However, the processor executing the instruction may not beable to determine which data corresponds to which effect. The optimalangle expressed above creates a function which puts all four effects(forward, backward, left and right) into one “direction.” In this way, aprocessor can execute one or more instructions to perform one or moreanalyses on the data without determining which data stream correspondsto which effect. This should mean that it would not matter, for example,if someone took all right turns, since right and left turns would now be“folded” into the same direction. In the example shown below the foldedangle is represented by the quadruple angle in the sine and cosinefunctions. This has the effect of putting the effects of forwardacceleration, backward acceleration, left turns, and right turns in thesame “direction” since:sin 4(δ+90°)=sin 4δ∀δcos 4(δ+90°)=cos 4δ∀δ

The processor may execute an instruction to solve for the optimal angleψ₀ by taking an angular average of four times the μ_(i)'s (thedirections of all the vectors in the XY-plane). If an angular averagewere taken of the μ_(i)'s without multiplying them by four, the effectsof the four different modes would corrupt each other in the angularaverage and create an undesirable solution. Since these modes are atninety degree angles to one another, multiplying each μ_(i) by four willalign them since sine and cosine repeat every 360 degrees (sin 4μ_(i)and cos 4μ_(i) will be equal for all μ_(i)'s that differ by integermultiples of 90 degrees). This solution gives an angle ψ₀ that has adomain spanning ninety degrees. The processor may also execute aninstruction to determine a set of possible yaw angles (block 818). Forexample, the processor may further expand the domain to create fourpossible solutions; ψ₀,

${\psi_{0} + \frac{\pi}{2}},$ψ₀+π and

$\psi_{0} + \frac{3\pi}{2}$(block 818). The processor may further execute an instruction to counthow many μ_(i)'s are within five degrees of ψ₀ and

$\psi_{0} + {\frac{\pi}{2}.}$The processor may determine the optimal output of the method based onwhichever has the greater count is considered the output from thismethod.

The processor may then execute an instruction to determine the yaw angle(ψ) (block 820). The processor may also execute an instruction to use atleast the yaw angle to determine one or more driving patterns (block822). The processor may also execute an instruction to use at least thedriving patterns to determine one or more insurance premiums. In someembodiments, the insurance premiums may be associated with a useraccount, such as the user account associated with the client computingdevice. For example, the processor may execute an instruction to use thedriving patterns to determine one or more driving characteristics of adriver associated with an insurance account. The processor may alsoexecute an instruction to determine a risk level of the driverassociated with the insurance account based on the drivingcharacteristics and/or driving patterns. The processor may also executean instruction to determine one or more insurance premiums based on therisk level.

FIG. 9 is a flowchart of a method, routine, algorithm or process 900 fortransforming raw accelerometer data into a form for use in determining ayaw angle, and determining a premium and a driving pattern. The method900 may be performed by the processor of a client computing device 104and/or a data server 128. The data server (such as data server 128described in reference to FIG. 1) may receive the raw telematics datafrom the client computing device.

In some embodiments, the processor may use the output of the method 800,as the first step in a two-step process to calculate the yaw angle. Oncethe output of the method 800 has been produced, the processor mayexecute the method 900 to find the angular mode by determining allvalues of yaw around the output obtained by the method 800.

The processor may receive the output of the method 800 (block 902) andexecute an instruction to normalize all acceleration vectors above athreshold value (block 904) to a unit vector. In some embodiments, thethreshold value may be equal to 0.1G. Graphically, the instructionexecuted by the processor makes the endpoints of all the vectors lie onthe unit circle. Turning briefly to FIG. 10C, a graph depicts a scatterplot of x and y data after the processor has executed an instruction tonormalize the remaining vectors magnitude to a value of 1 and theprocessor has executed an instruction to project the points on a unitcircle. In some embodiments, the instruction may incorporate anexpression for graphing the points to the unit circle.

The processor may execute an instruction to overlay a static region(block 906) with, for example, an arc length of 10 degrees that iscentered along the y-axis, which as discussed above, is where theassumed modal direction is located. FIG. 10D graphically depicts astatic region with an arc length of 10 degrees centered along they-axis.

Next, the processor may then execute an instruction to rotate thescatter plot (block 908). In some embodiments, the scatter plot may berotated at, for example, 1 degree at a time. The rotation is graphicallydepicted in FIGS. 10E and 10F. The processor may also execute aninstruction to determine the number of points in the static region ateach rotation (block 910). The processor may also execute an instructionto count the number of points that lie in the fixed region (denoted byn_(i)) and record the highest count, n_(max), with corresponding angleψ_(max). In some embodiments, the number of points may be equal to thesum of the count in the bottom half and top half of the static region.In some embodiments, the processor may execute an instruction to performthe rotation one degree at a time, performing a total of 180calculations.

The processor executing the instruction may also determine the anglewith the number of points in the static region count (block 912). Thismay be represented as, for example, FIG. 10F graphically depicts an arcof, for example 10 degrees, overlaid on the region with the greatestdistribution of points. However, it is also possible that the processorexecuting the instruction will record one or more angles that are withina threshold amount from ψ_(max). The processor executing the instructionmay record any angle of rotation that produces a count within athreshold value of ψ_(max). In some embodiments, the threshold may befive data points, though in other embodiments, other threshold valuesmay be used.

The processor may execute an instruction to calculate a weighted averagewith all of the recorded angle of rotation that produced a count withinthe threshold value. The processor may then execute an instruction tocalculate the yaw angle (ψ) (block 914). For example, the instructionmay incorporate the formula:ψ=a tan 2(Σ_(i) n _(i) sin ψ_(i),Σ_(i) n _(i) cos ψ_(i)) for all i suchthat |n _(max) −n _(i)|≦5

In this manner the processor executing the instruction calculates arefined measure of yaw, but still has four possible solutions: ψ,

${\psi + \frac{\pi}{2}},$ψ+π and

$\psi + {\frac{3\pi}{2}.}$These solutions provide two time series signal orthogonal to each other;one is forward/backward acceleration and the second is left/right turnevents. The processor may further execute an instruction to correlatethe yaw data with additional available sensor data (block 916). Forexample, the processor can execute an instruction to correlate the yawdata with GPS speed, gyroscope or magnetic sensor data when available toidentify which yaw data corresponds to forward/backward motion.

If GPS is available sporadically or always, that can be used todetermine a GPS speed-based longitudinal and lateral acceleration.Measuring correlation between the accelerometer-based forward/backwardand left/right acceleration signal, one can identify the headingdirection.

If the device contains sensors to measure azimuth, then rate of changeof azimuth is equal to angular speed and lateral acceleration. Azimuthis defined as the angle between Earth's magnetic north pole and thedevice's positive y-axis. This is given by: Lateralacceleration=speed×angular speed

The positive changes in angular speed indicate right turns and anegative change indicates left turns. Correlating the angular speedsignal with the two pairs of solutions will help identify all fourdirections. The angular speed signal will maximally and positivelycorrelate left and right turns when right turns are aligned withpositive azimuth changes. In some embodiments, gyroscope data can alsobe used to identify angular speed.

The processor may also execute an instruction to use at least theheading direction or yaw angle to determine one or more driving patterns(block 918). The processor may also execute an instruction to use atleast the driving patterns to determine one or more insurance premiums.In some embodiments, the insurance premiums may be associated with auser account, such as the user account associated with the clientcomputing device. For example, the processor may execute an instructionto use the driving patterns to determine one or more drivingcharacteristics of a driver associated with an insurance account. Theprocessor may also execute an instruction to determine a risk level ofthe driver associated with the insurance account based on the drivingcharacteristics and/or driving patterns. The processor may also executean instruction to determine one or more insurance premiums based on therisk level.

The following additional considerations apply to the foregoingdiscussion. Throughout this specification, plural instances mayimplement functions, components, operations, or structures described asa single instance. Although individual functions and instructions of oneor more methods are illustrated and described as separate operations,one or more of the individual operations may be performed concurrently,and nothing requires that the operations be performed in the orderillustrated. Structures and functionality presented as separatecomponents in example configurations may be implemented as a combinedstructure or component. Similarly, structures and functionalitypresented as a single component may be implemented as separatecomponents. These and other variations, modifications, additions, andimprovements fall within the scope of the subject matter herein.

The methods described in this application may include one or morefunctions or routines in the form of non-transitory computer-executableinstructions that are stored in a tangible computer-readable storagemedium and executed using a processor of a computing device (e.g., theclient computing device 104, the server 128, or any combination ofcomputing devices within the system 100). The routines may be includedas part of any of the modules described in relation to FIG. 1 or 2 or aspart of a module that is external to the system illustrated by FIGS. 1and 2. For example, the methods may be part of a browser application oran application running on the client computing device 104 as a plug-inor other module of the browser application. Further, the methods may beemployed as “software-as-a-service” to provide a client computing device104 with access to the data server 128.

Additionally, certain embodiments are described herein as includinglogic or a number of functions, components, modules, blocks, ormechanisms. Functions may constitute either software modules (e.g.,non-transitory code stored on a tangible machine-readable storagemedium) or hardware modules. A hardware module is a tangible unitcapable of performing certain operations and may be configured orarranged in a certain manner. In example embodiments, one or morecomputer systems (e.g., a standalone, client or server computer system)or one or more hardware modules of a computer system (e.g., a processoror a group of processors) may be configured by software (e.g., anapplication or application portion) as a hardware module that operatesto perform certain operations as described herein.

In various embodiments, a hardware module may be implementedmechanically or electronically. For example, a hardware module maycomprise dedicated circuitry or logic that is permanently configured(e.g., as a special-purpose processor, such as a field programmable gatearray (FPGA) or an application-specific integrated circuit (ASIC)) toperform certain functions. A hardware module may also compriseprogrammable logic or circuitry (e.g., as encompassed within ageneral-purpose processor or other programmable processor) that istemporarily configured by software to perform certain operations. Itwill be appreciated that the decision to implement a hardware modulemechanically, in dedicated and permanently configured circuitry, or intemporarily configured circuitry (e.g., configured by software) may bedriven by cost and time considerations.

Accordingly, the term hardware should be understood to encompass atangible entity, be that an entity that is physically constructed,permanently configured (e.g., hardwired), or temporarily configured(e.g., programmed) to operate in a certain manner or to perform certainoperations described herein. Considering embodiments in which hardwaremodules are temporarily configured (e.g., programmed), each of thehardware modules need not be configured or instantiated at any oneinstance in time. For example, where the hardware modules comprise ageneral-purpose processor configured using software, the general-purposeprocessor may be configured as respective different hardware modules atdifferent times. Software may accordingly configure a processor, forexample, to constitute a particular hardware module at one instance oftime and to constitute a different hardware module at a differentinstance of time.

Hardware and software modules can provide information to, and receiveinformation from, other hardware and/or software modules. Accordingly,the described hardware modules may be regarded as being communicativelycoupled. Where multiple of such hardware or software modules existcontemporaneously, communications may be achieved through signaltransmission (e.g., over appropriate circuits and buses) that connectthe hardware or software modules. In embodiments in which multiplehardware modules or software are configured or instantiated at differenttimes, communications between such hardware or software modules may beachieved, for example, through the storage and retrieval of informationin memory structures to which the multiple hardware or software moduleshave access. For example, one hardware or software module may perform anoperation and store the output of that operation in a memory device towhich it is communicatively coupled. A further hardware or softwaremodule may then, at a later time, access the memory device to retrieveand process the stored output. Hardware and software modules may alsoinitiate communications with input or output devices, and can operate ona resource (e.g., a collection of information).

The various operations of example functions and methods described hereinmay be performed, at least partially, by one or more processors that aretemporarily configured (e.g., by software) or permanently configured toperform the relevant operations. Whether temporarily or permanentlyconfigured, such processors may constitute processor-implemented modulesthat operate to perform one or more operations or functions. The modulesreferred to herein may, in some example embodiments, compriseprocessor-implemented modules.

Similarly, the methods or functions described herein may be at leastpartially processor-implemented. For example, at least some of thefunctions of a method may be performed by one or processors orprocessor-implemented hardware modules. The performance of certain ofthe functions may be distributed among the one or more processors, notonly residing within a single machine, but deployed across a number ofmachines. In some example embodiments, the processor or processors maybe located in a single location (e.g., within a home environment, anoffice environment or as a server farm), while in other embodiments theprocessors may be distributed across a number of locations.

The one or more processors may also operate to support performance ofthe relevant operations in a “cloud computing” environment or as a“software as a service” (SaaS). For example, at least some of thefunctions may be performed by a group of computers (as examples ofmachines including processors), these operations being accessible via anetwork (e.g., the Internet) and via one or more appropriate interfaces(e.g., application program interfaces (APIs).

The performance of certain of the operations may be distributed amongthe one or more processors, not only residing within a single machine,but deployed across a number of machines. In some example embodiments,the one or more processors or processor-implemented modules may belocated in a single geographic location (e.g., within a homeenvironment, an office environment, or a server farm). In other exampleembodiments, the one or more processors or processor-implemented modulesmay be distributed across a number of geographic locations.

Some portions of this specification are presented in terms of algorithmsor symbolic representations of operations on data and data structuresstored as bits or binary digital signals within a machine memory (e.g.,a computer memory). These algorithms or symbolic representations areexamples of techniques used by those of ordinary skill in the dataprocessing arts to convey the substance of their work to others skilledin the art. As used herein, a “function” or an “algorithm” or a“routine” is a self-consistent sequence of operations or similarprocessing leading to a desired result. In this context, functions,algorithms, routines and operations involve physical manipulation ofphysical quantities. Typically, but not necessarily, such quantities maytake the form of electrical, magnetic, or optical signals capable ofbeing stored, accessed, transferred, combined, compared, or otherwisemanipulated by a machine. It is convenient at times, principally forreasons of common usage, to refer to such signals using words such as“data,” “content,” “bits,” “values,” “elements,” “symbols,”“characters,” “terms,” “numbers,” “numerals,” or the like. These words,however, are merely convenient labels and are to be associated withappropriate physical quantities.

Unless specifically stated otherwise, discussions herein using wordssuch as “processing,” “computing,” “calculating,” “determining,”“presenting,” “displaying,” or the like may refer to actions orprocesses of a machine (e.g., a computer) that manipulates or transformsdata represented as physical (e.g., electronic, magnetic, or optical)quantities within one or more memories (e.g., volatile memory,non-volatile memory, or a combination thereof), registers, or othermachine components that receive, store, transmit, or displayinformation.

As used herein any reference to “some embodiments” or “one embodiment”or “an embodiment” means that a particular element, feature, structure,or characteristic described in connection with the embodiment isincluded in at least one embodiment. The appearances of the phrase “inone embodiment” in various places in the specification are notnecessarily all referring to the same embodiment.

Some embodiments may be described using the expression “coupled” and“connected” along with their derivatives. For example, some embodimentsmay be described using the term “coupled” to indicate that two or moreelements are in direct physical or electrical contact. The term“coupled,” however, may also mean that two or more elements are not indirect contact with each other, but yet still co-operate or interactwith each other. The embodiments are not limited in this context.

As used herein, the terms “comprises,” “comprising,” “includes,”“including,” “has,” “having” or any other variation thereof, areintended to cover a non-exclusive inclusion. For example, a function,process, method, article, or apparatus that comprises a list of elementsis not necessarily limited to only those elements but may include otherelements not expressly listed or inherent to such process, method,article, or apparatus. Further, unless expressly stated to the contrary,“or” refers to an inclusive or and not to an exclusive or. For example,a condition A or B is satisfied by any one of the following: A is true(or present) and B is false (or not present), A is false (or notpresent) and B is true (or present), and both A and B are true (orpresent).

In addition, use of the “a” or “an” are employed to describe elementsand components of the embodiments herein. This is done merely forconvenience and to give a general sense of the description. Thisdescription should be read to include one or at least one and thesingular also includes the plural unless it is obvious that it is meantotherwise.

Still further, the figures depict preferred embodiments of the systemfor separating ambient gravitational acceleration from a movingthree-axis accelerometer data. One of ordinary skill in the art willreadily recognize from the following discussion that alternativeembodiments of the structures and methods illustrated herein may beemployed without departing from the principles described herein.

Upon reading this disclosure, those of skill in the art will appreciatestill additional alternative structural and functional designs forseparating ambient gravitational acceleration from a moving three-axisaccelerometer data through the disclosed principles herein. Thus, whileparticular embodiments and applications have been illustrated anddescribed, it is to be understood that the disclosed embodiments are notlimited to the precise construction and components disclosed herein.Various modifications, changes and variations, which will be apparent tothose skilled in the art, may be made in the arrangement, operation anddetails of the method and apparatus disclosed herein without departingfrom the spirit and scope defined in the appended claims.

To the extent that any meaning or definition of a term in this documentconflicts with any meaning or definition of the same term in a documentincorporated by reference, the meaning or definition assigned to thatterm in this document shall govern. The detailed description is to beconstrued as exemplary only and does not describe every possibleembodiment since describing every possible embodiment would beimpractical, if not impossible. Numerous alternative embodiments couldbe implemented, using either current technology or technology developedafter the filing date of this patent, which would still fall within thescope of the claims. While particular embodiments of the presentinvention have been illustrated and described, it would be obvious tothose skilled in the art that various other changes and modificationscan be made without departing from the spirit and scope of theinvention. It is therefore intended to cover in the appended claims allsuch changes and modifications that are within the scope of thisinvention.

What is claimed is:
 1. A computer implemented method for determining adriving pattern, the method comprising: receiving, via a computernetwork, telematics data corresponding to a trip of a moving vehicle andoriginating from a client computing device; combining, by one or moreprocessors, the telematics data; identifying, by the one or moreprocessors, a primary movement window from the telematics data, whereinthe primary movement window is indicative of the client computing devicebeing static with respect to the moving vehicle; estimating, by the oneor more processors, a gravitational constant from the combinedtelematics data in the primary movement window such that thegravitational constant is the only force acting on a Z-Axis of themoving vehicle according to a reference frame of the moving vehicle;generating, by the one or more processors, a pitch angle and a rollangle from the combined telematics data in the primary movement windowthat aligns the gravitational constant with the Z-Axis of the movingvehicle; and determining, by the one or more processors, the drivingpattern using at least the pitch angle and the roll angle.
 2. The methodof claim 1 further comprising: applying, by the one or more processors,a rotation matrix to the telematics data, wherein the rotation matrixaccounts for the pitch angle and roll angle.
 3. The method of claim 1,wherein generating the pitch angle and roll angle further comprises:measuring, by the one or more processors, an acceleration in thedirection of gravity from the telematics data; maximizing, by the one ormore processors, the measured acceleration in the direction of gravity;and generating, by the one or more processors, a function for each ofthe pitch and the roll angles.
 4. The method of claim 1 whereindetermining the driving pattern further comprises: determining, by theone or more processors, that the pitch angle and roll angle areindicative of at least one of: an acceleration event, a braking event, aleft turn event and a right turn event.
 5. The method of claim 1 whereingenerating the pitch angle and the roll angle further comprisesincorporating a rotation matrix definition.
 6. The method of claim 1further comprising: measuring, by the one or more processors, the effectof gravity from the telematics data; minimizing, by the one or moreprocessors, a squared error in the measured gravity in the primarymovement window; establishing, by the one or more processors, a functionof the gravitational constant based at least on the measured gravity;generating, by the one or more processors, a function for each of asecond pitch angle and a second roll angle using the gravitationalconstant; determining, by the one or more processors, a differencebetween the pitch angle and the second pitch angle; determining, by theone or more processors, a difference between the roll angle and thesecond roll angle; and determining, by the one or more processors,whether each difference is within a defined threshold limit.
 7. Themethod of claim 6 wherein minimizing a squared error in the measuredgravity includes a least squares solution.
 8. A computer device fordetermining a driving pattern, the computer device comprising: one ormore processors; and one or more memories coupled to the one or moreprocessors; wherein the one or more memories include non-transitorycomputer executable instructions stored therein that, when executed bythe one or more processors, cause the one or more processors to: receivetelematics data corresponding to a trip of a moving vehicle andoriginating from a client computing device; combine the telematics data;identify a primary movement window from the telematics data, wherein theprimary movement window is indicative of the client computing devicebeing static with respect to the moving vehicle; estimate agravitational constant from the combined telematics data in the primarymovement window such that the gravitational constant is the only forceacting on a Z-Axis of the moving vehicle according to a reference frameof the moving vehicle; generate a pitch angle and a roll angle from thecombined telematics data in the primary movement window that aligns thegravitational constant with the Z-Axis of the moving vehicle; anddetermine at the one or more processors, the driving pattern using atleast the pitch angle and the roll angle.
 9. The computer device ofclaim 8, wherein the non-transitory computer executable instructionsfurther cause the one or more processors to: apply a rotation matrix tothe telematics data, wherein the rotation matrix accounts for the pitchangle and roll angle.
 10. The computer device of claim 8, wherein thenon-transitory computer executable instructions further cause the one ormore processors to: measure an acceleration in the direction of gravityfrom the telematics data; maximize the measured acceleration in thedirection of gravity; and generate a function for each of the pitch andthe roll angles.
 11. The computer device of claim 8 wherein thenon-transitory computer executable instructions further cause the one ormore processors to: determine that the pitch angle and roll angle areindicative of at least one of an acceleration of an acceleration event,a braking event, a left turn event and a right turn event.
 12. Thecomputer device of claim 8, wherein the non-transitory computerexecutable instructions to generate a pitch angle and a roll anglefurther cause the one or more processors to: incorporate a rotationmatrix definition.
 13. The computer device of claim 8, wherein thenon-transitory computer executable instructions further cause the one ormore processors to: measure, by the one or more processors, the effectof gravity from the telematics data; minimize a squared error in themeasured gravity from the telematics data in the primary movementwindow; establish a function of the gravitational constant based atleast on the measured gravity; generate a function for each of a secondpitch angle and a second roll angle using the gravitational constant;determine a difference between the pitch angle and the second pitchangle; determine a difference between the roll angle and the second rollangle; and determine whether each difference is within a definedthreshold limit.
 14. The computer device of claim 13, wherein thenon-transitory computer executable instructions to minimize a squarederror in the measured gravity includes a least squares solution.
 15. Acomputer readable storage medium comprising non-transitory computerreadable instructions stored thereon for determining a driving pattern,the instructions when executed on one or more processors cause the oneor more processors to: receive, via a computer network, telematics datacorresponding to a trip of a moving vehicle and originating from aclient computing device; combine the telematics data; identify a primarymovement window from the telematics data, wherein the primary movementwindow is indicative of the client computing device being static withrespect to the moving vehicle; estimate a gravitational constant fromthe combined telematics data in the primary movement window such thatthe gravitational constant is the only force acting on a Z-Axis of themoving vehicle according to a reference frame of the moving vehicle;generate a pitch angle and a roll angle from the combined telematicsdata in the primary movement window that aligns the gravitationalconstant with the Z-Axis of the moving vehicle; and determine thedriving pattern using at least the pitch angle and the roll angle. 16.The computer readable storage medium of claim 15, comprising furtherinstructions stored thereon that cause the one or more processors to:apply a rotation matrix to the telematics data, wherein the rotationmatrix accounts for the pitch angle and roll angle.
 17. The computerreadable storage medium of claim 15, comprising further instructionsstored thereon that cause the one or more processors to: measure anacceleration in the direction of gravity from the telematics data; andmaximize the measured acceleration in the direction of gravity.
 18. Thecomputer readable storage medium of claim 15, comprising furtherinstructions stored thereon that cause the one or more processors to:incorporate a rotation matrix definition.
 19. The computer readablestorage medium of claim 15, comprising further instructions storedthereon that cause the one or more processors to: measure the effect ofgravity from the telematics data; minimize a squared error in themeasured gravity from the telematics data in the primary movementwindow; establish a function of the gravitational constant based atleast on the measured gravity; generate a function for each of a secondpitch angle and a second roll angle using the gravitational constant;determine a difference between the pitch angle and the second pitchangle; determine a difference between the roll angle and the second rollangle; and determine whether each difference is within a definedthreshold limit.
 20. The computer readable storage medium of claim 19,wherein the instructions stored thereon that cause the one or moreprocessors to minimize a squared error in the measured gravity includesa least squares solution.